
#ifndef _DialogxManager_H_
#define _DialogxManager_H_

#include "../OLCore/AbstractManager.hpp"
#include "../OLCore/AbstractObject.hpp"
#include "../OLApp/Application.hpp"


namespace NSApplication {

	class APPLICATIONAPI DialogxManager :
		public NSCore::AbstractManager
	{
		Q_OBJECT

	public:
		DialogxManager();
		~DialogxManager();
	public:
		inline QString className() override { return "DialogxManager"; };
		template<typename T>
		T* getWidget(QString name) {
			T* ins = dynamic_cast<T*>(getObject(name));
			return ins;
		}
		template<typename T>
		void addWidget(T* widget) {
			//PythonQtObjectPtr context = PythonQt::self()->getMainModule();
			//context.addObject("insOf" + widget->className(), widget);
			registerObject(widget);
		}

	};

}

#endif
